package chapterTwo.couplingandcohesion;

public class DoTaxes {

	float rate;

	float doColorado() {
		SalesTaxRates str = new SalesTaxRates();
		rate = str.salesRate; // ouch
		// this should be a method call:
		// rate = str.getSalesRate("CO");
		// do stuff with rate
		System.out.println("calling DoTaxes.doColorado()");
return rate;
	} 
	
	public static void main(String args[]){
		
		DoTaxes dt=new DoTaxes();
		System.out.println(dt.doColorado());
		
		
	}
	
}

class SalesTaxRates {
	public float salesRate; // should be private
	public float adjustedSalesRate; // should be private

	public static int getSalesRateB(String region){return 0;} 
	
	public static int getSalesRateB(String region,int var){return 0;} 
	
	public float getSalesRate(String region) {
		salesRate = new DoTaxes().doColorado(); // ouch again!
		// do region-based calculations
		
		System.out.println("calling SalesTaxRates.getSalesRate(String region)");
		return adjustedSalesRate;
	}
}
